package com.panda.cn.utils.security;

import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.crypto.digest.Digester;

public class SecureUtil {
    
    /**
     * 加密
     *
     * @param str str
     * @return {@link String}
     */
    public static String encrypt(String str) {
        Digester digester = DigestUtil.digester("sm3");
        String digestHex = digester.digestHex(str);
        return digester.digestHex(digestHex);
    }
}
